<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>Modify Users</title>
    </h:head>
    <h:body>
        <h:form>
            <h:dataTable value="#{userBean.userClasses}" var="user">
                <h:column>
                    <f:facet name="header">Firstname</f:facet>
                    <h:inputText value="#{user.firstName}" size="20"  />
                </h:column>
                <h:column>
                    <f:facet name="header">LastName</f:facet>
                    <h:inputText value="#{user.lastName}" size="20"  />
                </h:column>
                <h:column>
                    <f:facet name="header">Username</f:facet>
                    <h:inputText value="#{user.username}" disabled="true" size="20"  />
                </h:column>
                <h:column>
                    <f:facet name="header">Password</f:facet>
                    <h:inputText value="#{user.password}" size="20"  />
                </h:column>
                <h:column>
                    <f:facet name="header">Email</f:facet>
                    <h:inputText value="#{user.email}" size="20"  />
                </h:column>
                <h:column>
                    <f:facet name="header">CIC Member</f:facet>
                    <h:selectBooleanCheckbox  value="#{user.cicMember}"  />   
                </h:column>
                <h:column>
                    <f:facet name="header">Evaluator</f:facet>
                    <h:selectBooleanCheckbox  value="#{user.evaluator}"  />   
                </h:column>
                <h:column>    	    
                    <f:facet name="header">DegreePrograms</f:facet>  
                    <h:selectManyCheckbox value="#{user.ownDegreePrograms}" >
                        <f:selectItems value="#{user.allDegreePrograms}" var="u" itemLabel="#{u}"/>
                    </h:selectManyCheckbox>

                </h:column>
            </h:dataTable>
            <p>
                <h:commandButton id='submit' value="Save" action="#{userBean.saveEntry()}" />
            </p>    
        </h:form>
    </h:body>
</html>